﻿@model CMS.Web.Engine.WidgetModelLogin     
     
@using (Html.BeginForm())
{
    foreach (var error in Model.Errors)
    {
        <div style="color: Red;">@error.Message</div>
    }
    if (!Model.IsAuthenticated)
    {
        <text>Логин:</text> @Html.TextBoxFor(m => m.Login)     
        <text>Пароль:</text> @Html.PasswordFor(m => m.Password)        
        <input type="submit" name="Login" value="Вход" />
    }
    else
    {
        <text>Добро пожаловать,</text> @Model.Login<text>.</text>
        <input type="submit" name="Logoff" value="Выход" /> 
    }
    @Html.HiddenFor(m => m.IsAuthenticated)
    <input type="hidden" name="widget" value="@Model.Widget" />
}